package com.example.demo.controller;

import com.example.demo.login.LoginRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AccountController {

    @PostMapping("/api/login")
    public ResponseEntity<?> login(@RequestBody LoginRequest loginRequest) {
        // 实际项目中这里应该有认证逻辑
        System.out.println("登录请求: " + loginRequest.getAccount());

        // 返回模拟的成功响应
        return ResponseEntity.ok().body("{\"success\": true}");
    }
}
